﻿using System.Collections.Generic;
using Api_Backstage.Code;
using BLL.Manage;
using Microsoft.AspNetCore.Mvc;
using Model.ApiResult.MessageRsult;

namespace Api.Controllers
{
    [Route("api/chat")]
    public class ChatMessageController : Controller
    {
        [HttpPost("message/new")]
        [AuthAttribute]
        public ActionResult<Model.Result<List<NewsChatMessage>>> GetNewMessageByRoomId(string messageId, string roomId)
        {
            return Json(new MessageManage().GetNewMessage(messageId, roomId));
        }

        [HttpPost("message/new/list")]
        [AuthAttribute]
        public ActionResult<Model.Result<List<Model.ApiResult.MessageRsult.NewChatMessageList>>> GetNewMessageList(string roomId)
        {
            return Json(new MessageManage().GetNewChatMessageList(roomId));
        }
    }
}